import request from '@/utils/request'

export async function getSerialNumListApi(params) {
  var resp = await request({
    url: '/master/serialnum/',
    method: 'get',
    params
  })
  return resp;
}

export async function createSerialNumApi(data) {
  var resp = await request({
    url: '/master/serialnum/',
    method: 'post',
    data
  })
  return resp
}

export async function updateSerialNumApi(id, data) {
  var resp = await request({
    url: '/master/serialnum/' + id + '/',
    method: 'put',
    data
  })
  return resp
}

export async function deleteSerialNumApi(id) {
  var resp = await request({
    url: '/master/serialnum/' + id + '/',
    method: 'delete'
  })
  return resp
}
// 根据当前登录用户获取该用户所属部门下的制番号
export async function getSerialNumByUserListApi(params) {
  var resp = await request({
    url: '/master/serialnumbyuser/',
    method: 'get',
    params
  })
  return resp;
}
